import xlrd
import openpyxl
dir_name = 'D:\\project\\project_3\\人物.xlsx'
def read_xlrd(dir_name):
    li_name = []
    data = xlrd.open_workbook(dir_name)
    print(data.sheet_names())
    for i in data.sheet_names():
        table = data.sheet_by_name(i)
        if i == '落马官员':
            # li_name.extend(table.col_values(2,1))
            # print(table.col_values(2,1))
            pass
        elif i == '国内领导人':
            li_name.extend(table.col_values(0, 1))

        else:
            # li_name.extend(table.col_values(0,1))
            # print(table.col_values(0,1))
            pass
    print(li_name)
    print(len(li_name))
    return li_name




if __name__ == '__main__':
    dir_name = 'D:\\project\\project_3\\人物.xlsx'
    read_xlrd(dir_name)